The C1Report.Page variable is created and automatically updated by the control. It is useful for adding page numbers to page headers or footers. In some cases, you may want to reset the page counter when a group starts. For example, in a report that groups records by country. You can do this by adding code or using the Designer.
To reset the page counter when a group (for example, a new country) starts, set the PageFooter field's Text property. Enter the following code:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1Report1.Fields("PageFooter").Text = "[ShipCountry] & "" "" & [Page]" |
To write code in C#
C# |
Copy Code
|
---|---|
c1Report1.Fields["PageFooter"].Text = "[ShipCountry] + [Page]"; |
To reset the page counter when a group (for example, a new country) starts, set the PageFooter field's Text property by completing the following steps:
[ShipCountry] & " - Page " & [Page]